from selenium.webdriver.common.by import By
from base import Base
class Page(Base):
    # 首页搜索框
    def sousuo1(self):
        loc=(By.ANDROID_UIAUTOMATOR,'new UiSelector().className("android.widget.RelativeLayout").instance(3)')
        ele=self.find_ele(loc)
        return ele
    # 搜索页搜索框
    def sousuo2(self):
        loc=(By.CLASS_NAME,'android.widget.EditText')
        ele=self.find_ele(loc)
        return ele
    # 搜索按钮
    def sousuoanniu(self):
        loc=(By.ID,'com.achievo.vipshop:id/tv_search')
        ele=self.find_ele(loc)
        return ele
    # 图片
    def tu(self):
        loc=(By.XPATH,'(//android.widget.RelativeLayout[@resource-id="com.achievo.vipshop:id/image_main_layout"])[1]/android.widget.FrameLayout')
        ele=self.find_ele(loc)
        return ele
    # 评价
    def pingjia1(self):
        loc=(By.XPATH,'//android.widget.TextView[@resource-id="com.achievo.vipshop:id/gallery_switch_text" and @text="评价"]')
        ele=self.find_ele(loc)
        return ele
    # 查看更多
    def ckgengduo(self):
        loc=(By.XPATH,'//android.widget.TextView[@text="查看全部评价"]')
        ele=self.find_ele(loc)
        return ele
    # 断言
    def d1uanyan(self):
        loc=(By.XPATH,'//android.widget.TextView[@content-desc="回头客(258)"]')
        ele=self.find_ele(loc)
        return ele